//----------------------------------------------------------------------------//
// I N C L U D E   Q T                                                        //
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// I N C L U D E   P R O J E C T                                              //
//----------------------------------------------------------------------------//
#include "timetable.h"


//----------------------------------------------------------------------------//
// M A C R O S                                                                //
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// T Y P E S   &   D E F I N I T I O N S                                      //
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// C O N T R U C T O R S                                                      //
//----------------------------------------------------------------------------//
/** Description
 *
 * parameter
 *
 */
TimeTable::TimeTable(QTime& time)
{
  Time = time;
}

//----------------------------------------------------------------------------//
// P U B L I C   M E T H O D S                                                //
//----------------------------------------------------------------------------//
/** Getter
 */
Theater* TimeTable::getTheater(void)
{
  return (Thtr);
}
QDate TimeTable::getDate(void)
{
  return (Date);
}
MovieDub_t TimeTable::getDub(void)
{
  return (Dub);
}
Movie3D_t TimeTable::get3D(void)
{
  return (ThreeD);
}
QTime TimeTable::getTime(void)
{
  return (Time);
}

/** Setter
 */
void TimeTable::setTheater(Theater* thtr)
{
  Thtr = thtr;
}
void TimeTable::setDate(QDate& date)
{
  Date = date;
}
void TimeTable::setDub(MovieDub_t& dub)
{
  Dub = dub;
}
void TimeTable::set3D(Movie3D_t& threeD)
{
  ThreeD = threeD;
}
void TimeTable::setTime(QTime& time)
{
  Time = time;
}

/** test if the parameters are the same has this timetable
 *
 * Theater*&   thtr             seance theater
 * QDate&      date             seance date
 * MovieDub_t& dub              seance movie dub
 * Movie3D_t&  threeD           seance display type
 * QTime&      time             seance time
 */
bool TimeTable::isDifferent(Theater*&   thtrTmp,
                            QDate&      dateTmp,
                            MovieDub_t& dubTmp,
                            Movie3D_t&  threeDTmp,
                            QTime&      timeTmp)
{
  return ((Thtr   != thtrTmp) ||
          (Date   != dateTmp) ||
          (Dub    != dubTmp) ||
          (ThreeD != threeDTmp) ||
          (Time   != timeTmp));
}

/** Operator of comparison ==
 */
bool TimeTable::operator==(TimeTable &right)
{
  return (Time == right.getTime());
}


//----------------------------------------------------------------------------//
// S L O T S                                                                  //
//----------------------------------------------------------------------------//


//----------------------------------------------------------------------------//
// P R I V A T E   M E T H O D S                                              //
//----------------------------------------------------------------------------//
